import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/home/ckeditor"
    },
    {
      path: "/home/index",
      name: "home",
      component: () => import("@/views/home/index")
    },
    {
      path: "/home/mngSite",
      name: "mngSite",
      component: () => import("@/views/home/mngSite")
    },
    {
      path: "/home/ckeditor",
      name: "ckeditor",
      component: () => import("@/views/home/ckeditor")
    },
    {
      path: "/apply1",
      name: "apply1",
      meta: {
        title: process.env.VUE_APP_TITLE + "申请",
        requiresAuth: true,
        roles: ["customer"]
      },
      component: () => import("@/views/apply/apply1")
    },
    {
      path: "*",
      redirect: "/"
    }
  ]
});
